<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include/tag.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>末级合伙人报名分佣详情表</title>
    <link rel="stylesheet" href="${ctx}/css/common/list.css">
    <link rel="stylesheet" href="${ctx}/css/common/table.css">
    <%@include file="../include/commonFile.jsp" %>
    <style>
        .list-content {
            padding-top: 20px;
            margin-bottom: 20px;
        }

        .list-content .num div{
            width: 50%;
            display: inline-block;
        }

        .list-content .num li {
            padding-right: 30px;
            padding-bottom: 10px;
            position: relative;
            display: inline-block;
            height: 30px;
            line-height: 30px;
        }

        .list-content .num li span {
            padding-left: 5px;
            font-weight: bold;
        }
    </style>
</head>
<body>
<!--头部-->
<%@include file="../include/header.jsp" %>
<div class="index-outside">
    <%@include file="../include/sidebar.jsp" %>
    <!--内容-->
    <section>
        <div class="section-main">
            <form class="layui-form" action="${ctx}/copartner/analyze/lowerCopartnerBrokerageDetailList.do" id="myForm" method="post">
                <input type="hidden" name="pageNo" id="pageNo"/>
                <div class="f-search-bar">
                    <div class="search-container">
                        <input type="hidden" name="parentId" value="${brokerageItem.parentId}"/>
                        <input type="hidden" name="partnerId" value="${brokerageItem.partnerId}"/>
                        <ul class="search-form-content">
                            <li class="form-item-inline"><label class="search-form-lable">项目名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="title" autocomplete="off"
                                           class="layui-input" value="${brokerageItem.title}" placeholder="项目名称">
                                </div>
                            </li>
                            <li class="form-item-inline"><label class="search-form-lable">所属分类</label>
                                <div class="layui-input-inline" style="width: 165px">
                                    <select name="type">
                                        <option value="" selected="selected">全部</option>
                                        <option value="1" ${brokerageItem.type == 1 ?'selected="selected"':''}>课程</option>
                                        <option value="0" ${brokerageItem.type == 0 ?'selected="selected"':''}>众筹</option>
                                    </select>
                                </div>
                            </li>
                            <li class="form-item-inline">
                                <div class="sub-btns">
                                    <a class="layui-btn layui-btn-danger" href="javascript:submitFunction('#myForm')">查询</a>
                                    <a class="layui-btn layui-btn-normal" href="javascript:resetFunction('#myForm')">重置</a>
                                </div>
                            </li>
                        </ul>
                        <ul class="search-form-content">
                            <li class="form-item">
                                <label class="search-form-lable">时间</label>
                                <div class="check-btn-inner">
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),'','#myForm')" ${empty query.timeType ? 'class="active"' : ''}>全部</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),1,'#myForm')" ${query.timeType == 1 ? 'class="active"' : ''}>今日</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),2,'#myForm')" ${query.timeType == 2 ? 'class="active"' : ''}>昨日</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),3,'#myForm')" ${query.timeType == 3 ? 'class="active"' : ''}>本周</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),4,'#myForm')" ${query.timeType == 4 ? 'class="active"' : ''}>本月</a>
                                    <a href="javascript:void(0);" onclick="setTimeType($(this),5,'#myForm')" ${query.timeType == 5 ? 'class="active"' : ''}>历史</a>
                                    <input type="hidden" name="timeType" value="${query.timeType}"/>
                                </div>
                                <div class="cl"></div>
                            </li>
                        </ul>
                    </div>
                </div>
            </form>
            <div class="list-content">
                <div class="cl">
                    <table class="layui-table">
                        <colgroup>
                            <col width="30%">
                            <col width="100">
                            <col width="300">
                            <col width="300">
                            <col width="300">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>项目名称</th>
                            <th style="text-align: center;">所属分类</th>
                            <th>获得佣金时间</th>
                            <th>获得佣金(元)</th>
                            <th>状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="brokerage" items="${list}">
                            <tr>
                                <td class="table-member" title="${brokerage.title}">
                                    ${brokerage.title}
                                </td>
                                <td style="text-align: center;">
                                    <c:choose>
                                        <c:when test="${brokerage.type == 1}">课程</c:when>
                                        <c:otherwise>众筹</c:otherwise>
                                    </c:choose>
                                </td>
                                <td><fmt:formatDate value="${brokerage.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                <td><fmt:formatNumber pattern="0.00" value="${brokerage.brokerage}"/></td>
                                <td>
                                    <c:if test="${brokerage.checkStatus == 6}">已退款</c:if>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div id="page_content" class="page-container"></div>
        </div><!--底部-->
        <%@include file="../include/footer.jsp" %>
    </section>
</div>

<script type="text/javascript" src="${ctx}/script/common/list.js"></script>
<script type="text/javascript" src="${ctx}/script/common/table_option.js"></script>
<script type="text/javascript">
    $(function () {
        //加载分页
        loadPageNew({
            elem: 'page_content',
            totalCount: '${page.totalCount}',
            limit: '${page.limit}',
            page: '${page.page}'
        });
    })
</script>
<script type="text/javascript">
    txz.initHeader({
        nav: [{
            name: '合伙人数据分析',
            href: '${ctx}/copartner/analyze/list.do',
        }, {
            name: '${parent.realname}'
        }, {
            name: '${member.realname}'
        }, {
            name: '分佣详情表',
            curr: true
        },],
        info: '<span class="f15">共 <b id="totalCount">${page.totalCount}</b> 条记录</span>',
        btns: [{
            name: '返回',
            icon: 'back',
            href: '${ctx}/copartner/analyze/copartnerList.do?parentId=${brokerageItem.parentId}&name=${parent.realname}'
        }]
    });
</script>
</body>
</html>